package Exercise;

import java.util.ArrayList;
import java.util.Collections;

public class exercise6 {
	public static void main(String[] args) {
		ArrayList<Integer> list1 = new ArrayList<>();
		Collections.addAll(list1, 1,2,2,3,4,5,6,4,3,2,2);
		ArrayList<Integer> list2 = new ArrayList<>();
		for(int i =0;i<list1.size();i++){
			Integer num = list1.get(i);
			if(!list2.contains(num)){
				list2.add(num);
			}
		}
		System.out.println(list2);
	}
}
